<template>
  <div>
    <div class="detail-rate">
      <div class="detail-rate-text">轻点评分</div>
      <div class="detail-rate-wrap">
        <van-rate
          :value="rateValue"
          :size="25"
          color="#1D89EE"
          void-color="#DEE0E2"
          void-icon="star"
          @change="onRateChange"
        ></van-rate>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "DetailRate",
    props: {
      rateValue: Number
    },
    methods: {
      onRateChange(e) { //评分更改时
        this.$emit('onRateChange', e.mp.detail)
      },
    }
  };
</script>

<style lang="less" scoped>
  .detail-rate {
    display: flex;
    justify-content: space-between;
    height: 22px;
    align-items: center;
    padding: 0 35px 0 21px;
    margin-top: 9px;
    .detail-rate-text {
      font-size: 12.5px;
      color: #99A0AA;
    }
    .detail-rate-wrap {
      display: flex;
      justify-content: space-between;
      align-items: center;
      width: 158px;
    }
  }
</style>
